package net.bite;

public class TestOne {
    private float k = 1.0f;
    public static int add(int... arr) {
        int ret = 0;
        for(int x : arr) {
            ret += x;
        }
        return ret;
    }

    public static void main(String[] args) {
        TestOne t = new TestOne();
        t.k = 1.0f;
    }
    public static void main0(String[] args) {
//        System.out.println(Student.name);//先打印 静态 在打印 1
//        Student s1 = new Student();//先 静态 再 实例
//        Student s2 = new Student();//先 静态 再 实例
//        s1 = null;
//        s2 = s1;
//        Student s = new Student();//先 静态 再 实例

//        System.out.println(new Student().name);//先 实例 再1
//        System.out.println(new Student().name);//先 实例 再1
        int[] arr = {1,2,3,4,5};
        System.out.println(add( 1, 23, 4, 5, 5, 5, 2));
        System.out.println(add(arr));
    }
}
class Student {
    int age;
    public static String name = "1";
    protected String sex;
    public Student() {
        System.out.println("这是在构造方法！！");
    }
    {
        System.out.println("这是构造/构造代码块！！！");
    }
    static {
        System.out.println("这是静态代码块！！！");
    }

}
